package com.yq.cp.controller.basics;


import com.yq.cp.entity.basics.Provinces;
import com.yq.cp.entity.common.ApiResult;
import com.yq.cp.service.basics.ProvincesService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 省份信息表 前端控制器
 * </p>
 *
 * @author shenyuqing
 * @since 2024-08-28
 */
@RestController
@RequestMapping("/provinces")
public class ProvincesController {
    @Resource
    ProvincesService provincesService;

    @PostMapping("list")
    public ApiResult list(){
        List<Provinces> list = provincesService.list();
        return ApiResult.success(list);
    }
}

